#ifndef LIST_H
#define LIST_H

#include "utils.h"

class List
{
private:
	struct ListNode
	{
		ListNode(const Vertex &v1, const Vertex &v2, int index1, int index2) : edge(v1, v2, index1, index2), next(0) {}
		~ListNode() { delete next; }

		Edge edge;
		ListNode *next;
	};

	ListNode *head;
	ListNode *tail;
	ListNode *current;

	int size;

public:
	List() : head(0), tail(0), current(0), size(0) {}
	~List() { delete head; }

	int getSize();
	void add(const Vertex &v1, const Vertex &v2, int index1, int index2);
	Edge *getNext();
};

#endif
